package com.lujieni.springbootmapconstructor.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Author：Jie Ni
 * @Date: 2025/7/8 17:40
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDTO {

    private Long id;

    private String name;

    private String email;

    private String formattedDate;

    private HobbyDTO hobbyDTO;

    // @JsonFormat对LocalDateTime和Date都有效
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime birthday;
}
